var thinkjs = require('thinkjs');
var path = require('path');

var rootPath = path.dirname(__dirname);

var instance = new thinkjs({
  APP_PATH: rootPath + path.sep + 'app',
  RUNTIME_PATH: rootPath + path.sep + 'runtime',
  ROOT_PATH: rootPath,
  RESOURCE_PATH: __dirname,
  env: 'testing'
});

var p = childProcess.exec('webpack --config webpack.static.config.js --optimize-minimize');
p.stdout.pipe(process.stdout);

var p1 = childProcess.exec('npm run compile-less');
p1.stdout.pipe(process.stdout);

instance.run();